import React from 'react';
import { inject, observer } from 'mobx-react';
import { toJS } from 'mobx';
import { Button } from 'antd';
import { WeaDialog, WeaLocaleProvider } from 'ecCom';
import DocMoveLog from '../Tables/DocMoveLog';

const store = [
  'docMoveLogStore',
  'docMoveStore',
];
const getLabel = WeaLocaleProvider.getLabel;
@inject(...store)
@observer
export default class MoveLog extends React.Component {
  constructor(props) {
    super(props);
    this.state = {};
  }

  hideDocMoveLog=() => {
    const { docMoveStore, DocMoveLogStore } = this.props;
    docMoveStore.setState({ showDocLog: false });
    // DocMoveLogStore.setState({ showSearchAd: false });
  }
  getBtns=()=>{
    return  [
      (<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@ib89gd@primary`} type="primary"
        onClick={this.hideDocMoveLog}
      >{getLabel(826, '确定')}</Button>),
      (<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@p556p9@cancel`} type="ghost"
        onClick={this.hideDocMoveLog}
      >{getLabel(31129, '取消')}</Button>),
    ]
  }
  render() {
    const { docMoveStore, DocMoveLogStore } = this.props;
    const { showDocLog } = docMoveStore;
    return (
      <WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@osjkd8`}
        className="wea-doc-log-modal"
        title={getLabel(83, '日志')}
        style={{ width: 900, height: 'auto' }}
        maskClosable={false}
        visible={showDocLog}
        onCancel={this.hideDocMoveLog }
        buttons={this.getBtns()}
      >
        <DocMoveLog ecId={`${this && this.props && this.props.ecId || ''}_DocMoveLog@h6fcez`} />
      </WeaDialog>
    );
  }
}
